import React, { lazy } from 'react'
import {
  AppOutline,
  MessageOutline,
  MessageFill,
  UnorderedListOutline,
  UserOutline,
} from 'antd-mobile-icons'


const MainLayout = lazy(() => import('../pages/mainLayout'))
const Home = lazy(() => import('../pages/home'))
const My = lazy(() => import('../pages/my'))
const Person = lazy(() => import('../pages/Person'))

export const homeRoutes = [
  {
    path: '/home',
    element: <Home></Home>,
    title: '首页',
    icon: <AppOutline />
  },
  {
    path: '/my',
    element: <My></My>,
    title: '我的',
    icon: <UserOutline />
  },
]

export const routes = [
  {
    path: '/',
    element: <MainLayout></MainLayout>,
    children: [
      ...homeRoutes,
      {
        path: '/',
        element: <Home></Home>
      }
    ]
  },
  {
    path: '/person',
    element: <Person></Person>
  },
]